<?php
ini_set("include_path", "/");
require_once 'ClsSebent/Product_class.php';


$Product= new Product_class;
$Product->Message="Create a New Category.";
if(isset($_POST['btn_add']) && $_POST['btn_add']!='' && $_POST['category_name']!='')
{
	
	$Product-> Product_category=$_POST["category_name"];
	$Product->Add_Category();	
}
?>
<script src="ClsSebent/Client_Validation.js" type="text/javascript"></script>
<form action="product_category.php" method="post" name="frm_cat">
<table width="100%" border="1">
  <tr>
    <td colspan="2"><div align="center">Add Category </div> </td>
  </tr>
  <tr>
    <td colspan="2">
	<div id="div_msg" align="center"><?php echo "<h2><font color='red'>".$Product-> Message."</font></h2>";?></div>
	</td>
  </tr>
  <tr>
    <td>Category Name </td>
    <td><input type="text" id="category_name" name="category_name"></td>
  </tr>
  <tr>
    <td colspan="2"><div align="center">
      <input type="submit" name="btn_add" value="Add Category" onClick="javascript: return validate_emptyfield('category_name' ,'Please Enter a Category Name')">
    </div></td>
  </tr>
</table>
</form>

